home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 March / maximum-cd-2000-03.iso / Quake3 Game Source / Q3AGameSource.exe / Main / ui_local.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-18  |  19.7 KB  |  731 lines

  1. // Copyright (C) 1999-2000 Id Software, Inc.
  2. //
  3. #ifndef __UI_LOCAL_H__
  4. #define __UI_LOCAL_H__
  5.  
  6. #include <string.h>
  7. #include <ctype.h>
  8. #include <limits.h>
  9.  
  10. #include "../game/q_shared.h"
  11. #include "../cgame/tr_types.h"
  12. #include "ui_public.h"
  13. #include "keycodes.h"
  14. #include "../game/bg_public.h"
  15.  
  16.  
  17. extern vmCvar_t    ui_ffa_fraglimit;
  18. extern vmCvar_t    ui_ffa_timelimit;
  19.  
  20. extern vmCvar_t    ui_tourney_fraglimit;
  21. extern vmCvar_t    ui_tourney_timelimit;
  22.  
  23. extern vmCvar_t    ui_team_fraglimit;
  24. extern vmCvar_t    ui_team_timelimit;
  25. extern vmCvar_t    ui_team_friendly;
  26.  
  27. extern vmCvar_t    ui_ctf_capturelimit;
  28. extern vmCvar_t    ui_ctf_timelimit;
  29. extern vmCvar_t    ui_ctf_friendly;
  30.  
  31. extern vmCvar_t    ui_arenasFile;
  32. extern vmCvar_t    ui_botsFile;
  33. extern vmCvar_t    ui_spScores1;
  34. extern vmCvar_t    ui_spScores2;
  35. extern vmCvar_t    ui_spScores3;
  36. extern vmCvar_t    ui_spScores4;
  37. extern vmCvar_t    ui_spScores5;
  38. extern vmCvar_t    ui_spAwards;
  39. extern vmCvar_t    ui_spVideos;
  40. extern vmCvar_t    ui_spSkill;
  41.  
  42. extern vmCvar_t    ui_spSelection;
  43.  
  44. extern vmCvar_t    ui_browserMaster;
  45. extern vmCvar_t    ui_browserGameType;
  46. extern vmCvar_t    ui_browserSortKey;
  47. extern vmCvar_t    ui_browserShowFull;
  48. extern vmCvar_t    ui_browserShowEmpty;
  49.  
  50. extern vmCvar_t    ui_brassTime;
  51. extern vmCvar_t    ui_drawCrosshair;
  52. extern vmCvar_t    ui_drawCrosshairNames;
  53. extern vmCvar_t    ui_marks;
  54.  
  55. extern vmCvar_t    ui_server1;
  56. extern vmCvar_t    ui_server2;
  57. extern vmCvar_t    ui_server3;
  58. extern vmCvar_t    ui_server4;
  59. extern vmCvar_t    ui_server5;
  60. extern vmCvar_t    ui_server6;
  61. extern vmCvar_t    ui_server7;
  62. extern vmCvar_t    ui_server8;
  63. extern vmCvar_t    ui_server9;
  64. extern vmCvar_t    ui_server10;
  65. extern vmCvar_t    ui_server11;
  66. extern vmCvar_t    ui_server12;
  67. extern vmCvar_t    ui_server13;
  68. extern vmCvar_t    ui_server14;
  69. extern vmCvar_t    ui_server15;
  70. extern vmCvar_t    ui_server16;
  71.  
  72. extern vmCvar_t    ui_cdkey;
  73. extern vmCvar_t    ui_cdkeychecked;
  74.  
  75.  
  76. //
  77. // ui_qmenu.c
  78. //
  79.  
  80. #define RCOLUMN_OFFSET            ( BIGCHAR_WIDTH )
  81. #define LCOLUMN_OFFSET            (-BIGCHAR_WIDTH )
  82.  
  83. #define SLIDER_RANGE            10
  84. #define    MAX_EDIT_LINE            256
  85.  
  86. #define MAX_MENUDEPTH            8
  87. #define MAX_MENUITEMS            64
  88.  
  89. #define MTYPE_NULL                0
  90. #define MTYPE_SLIDER            1    
  91. #define MTYPE_ACTION            2
  92. #define MTYPE_SPINCONTROL        3
  93. #define MTYPE_FIELD                4
  94. #define MTYPE_RADIOBUTTON        5
  95. #define MTYPE_BITMAP            6    
  96. #define MTYPE_TEXT                7
  97. #define MTYPE_SCROLLLIST        8
  98. #define MTYPE_PTEXT                9
  99. #define MTYPE_BTEXT                10
  100.  
  101. #define QMF_BLINK                0x00000001
  102. #define QMF_SMALLFONT            0x00000002
  103. #define QMF_LEFT_JUSTIFY        0x00000004
  104. #define QMF_CENTER_JUSTIFY        0x00000008
  105. #define QMF_RIGHT_JUSTIFY        0x00000010
  106. #define QMF_NUMBERSONLY            0x00000020    // edit field is only numbers
  107. #define QMF_HIGHLIGHT            0x00000040
  108. #define QMF_HIGHLIGHT_IF_FOCUS    0x00000080    // steady focus
  109. #define QMF_PULSEIFFOCUS        0x00000100    // pulse if focus
  110. #define QMF_HASMOUSEFOCUS        0x00000200
  111. #define QMF_NOONOFFTEXT            0x00000400
  112. #define QMF_MOUSEONLY            0x00000800    // only mouse input allowed
  113. #define QMF_HIDDEN                0x00001000    // skips drawing
  114. #define QMF_GRAYED                0x00002000    // grays and disables
  115. #define QMF_INACTIVE            0x00004000    // disables any input
  116. #define QMF_NODEFAULTINIT        0x00008000    // skip default initialization
  117. #define QMF_OWNERDRAW            0x00010000
  118. #define QMF_PULSE                0x00020000
  119. #define QMF_LOWERCASE            0x00040000    // edit field is all lower case
  120. #define QMF_UPPERCASE            0x00080000    // edit field is all upper case
  121. #define QMF_SILENT                0x00100000
  122.  
  123. // callback notifications
  124. #define QM_GOTFOCUS                1
  125. #define QM_LOSTFOCUS            2
  126. #define QM_ACTIVATED            3
  127.  
  128. typedef struct _tag_menuframework
  129. {
  130.     int    cursor;
  131.     int cursor_prev;
  132.  
  133.     int    nitems;
  134.     void *items[MAX_MENUITEMS];
  135.  
  136.     void (*draw) (void);
  137.     sfxHandle_t (*key) (int key);
  138.  
  139.     qboolean    wrapAround;
  140.     qboolean    fullscreen;
  141.     qboolean    showlogo;
  142. } menuframework_s;
  143.  
  144. typedef struct
  145. {
  146.     int type;
  147.     const char *name;
  148.     int    id;
  149.     int x, y;
  150.     int left;
  151.     int    top;
  152.     int    right;
  153.     int    bottom;
  154.     menuframework_s *parent;
  155.     int menuPosition;
  156.     unsigned flags;
  157.  
  158.     void (*callback)( void *self, int event );
  159.     void (*statusbar)( void *self );
  160.     void (*ownerdraw)( void *self );
  161. } menucommon_s;
  162.  
  163. typedef struct {
  164.     int        cursor;
  165.     int        scroll;
  166.     int        widthInChars;
  167.     char    buffer[MAX_EDIT_LINE];
  168.     int        maxchars;
  169. } mfield_t;
  170.  
  171. typedef struct
  172. {
  173.     menucommon_s    generic;
  174.     mfield_t        field;
  175. } menufield_s;
  176.  
  177. typedef struct 
  178. {
  179.     menucommon_s generic;
  180.  
  181.     float minvalue;
  182.     float maxvalue;
  183.     float curvalue;
  184.  
  185.     float range;
  186. } menuslider_s;
  187.  
  188. typedef struct
  189. {
  190.     menucommon_s generic;
  191.  
  192.     int    oldvalue;
  193.     int curvalue;
  194.     int    numitems;
  195.     int    top;
  196.         
  197.     const char **itemnames;
  198.  
  199.     int width;
  200.     int height;
  201.     int    columns;
  202.     int    seperation;
  203. } menulist_s;
  204.  
  205. typedef struct
  206. {
  207.     menucommon_s generic;
  208. } menuaction_s;
  209.  
  210. typedef struct
  211. {
  212.     menucommon_s generic;
  213.     int curvalue;
  214. } menuradiobutton_s;
  215.  
  216. typedef struct
  217. {
  218.     menucommon_s    generic;
  219.     char*            focuspic;    
  220.     char*            errorpic;
  221.     qhandle_t        shader;
  222.     qhandle_t        focusshader;
  223.     int                width;
  224.     int                height;
  225.     float*            focuscolor;
  226. } menubitmap_s;
  227.  
  228. typedef struct
  229. {
  230.     menucommon_s    generic;
  231.     char*            string;
  232.     int                style;
  233.     float*            color;
  234. } menutext_s;
  235.  
  236. extern void            Menu_Cache( void );
  237. extern void            Menu_Focus( menucommon_s *m );
  238. extern void            Menu_AddItem( menuframework_s *menu, void *item );
  239. extern void            Menu_AdjustCursor( menuframework_s *menu, int dir );
  240. extern void            Menu_Draw( menuframework_s *menu );
  241. extern void            *Menu_ItemAtCursor( menuframework_s *m );
  242. extern sfxHandle_t    Menu_ActivateItem( menuframework_s *s, menucommon_s* item );
  243. extern void            Menu_SetCursor( menuframework_s *s, int cursor );
  244. extern void            Menu_SetCursorToItem( menuframework_s *m, void* ptr );
  245. extern sfxHandle_t    Menu_DefaultKey( menuframework_s *s, int key );
  246. extern void            Bitmap_Init( menubitmap_s *b );
  247. extern void            Bitmap_Draw( menubitmap_s *b );
  248. extern void            ScrollList_Draw( menulist_s *l );
  249. extern sfxHandle_t    ScrollList_Key( menulist_s *l, int key );
  250. extern sfxHandle_t    menu_in_sound;
  251. extern sfxHandle_t    menu_move_sound;
  252. extern sfxHandle_t    menu_out_sound;
  253. extern sfxHandle_t    menu_buzz_sound;
  254. extern sfxHandle_t    menu_null_sound;
  255. extern vec4_t        menu_text_color;
  256. extern vec4_t        menu_grayed_color;
  257. extern vec4_t        menu_dark_color;
  258. extern vec4_t        menu_highlight_color;
  259. extern vec4_t        menu_red_color;
  260. extern vec4_t        menu_black_color;
  261. extern vec4_t        menu_dim_color;
  262. extern vec4_t        color_black;
  263. extern vec4_t        color_white;
  264. extern vec4_t        color_yellow;
  265. extern vec4_t        color_blue;
  266. extern vec4_t        color_orange;
  267. extern vec4_t        color_red;
  268. extern vec4_t        color_dim;
  269. extern vec4_t        name_color;
  270. extern vec4_t        list_color;
  271. extern vec4_t        listbar_color;
  272. extern vec4_t        text_color_disabled; 
  273. extern vec4_t        text_color_normal;
  274. extern vec4_t        text_color_highlight;
  275.  
  276. extern char    *ui_medalNames[];
  277. extern char    *ui_medalPicNames[];
  278. extern char    *ui_medalSounds[];
  279.  
  280. //
  281. // ui_mfield.c
  282. //
  283. extern void            MField_Clear( mfield_t *edit );
  284. extern void            MField_KeyDownEvent( mfield_t *edit, int key );
  285. extern void            MField_CharEvent( mfield_t *edit, int ch );
  286. extern void            MField_Draw( mfield_t *edit, int x, int y, int style, vec4_t color );
  287. extern void            MenuField_Init( menufield_s* m );
  288. extern void            MenuField_Draw( menufield_s *f );
  289. extern sfxHandle_t    MenuField_Key( menufield_s* m, int* key );
  290.  
  291. //
  292. // ui_menu.c
  293. //
  294. extern void MainMenu_Cache( void );
  295. extern void UI_MainMenu(void);
  296. extern void UI_RegisterCvars( void );
  297. extern void UI_UpdateCvars( void );
  298.  
  299. //
  300. // ui_credits.c
  301. //
  302. extern void UI_CreditMenu( void );
  303.  
  304. //
  305. // ui_ingame.c
  306. //
  307. extern void InGame_Cache( void );
  308. extern void UI_InGameMenu(void);
  309.  
  310. //
  311. // ui_confirm.c
  312. //
  313. extern void ConfirmMenu_Cache( void );
  314. extern void UI_ConfirmMenu( const char *question, void (*draw)( void ), void (*action)( qboolean result ) );
  315.  
  316. //
  317. // ui_setup.c
  318. //
  319. extern void UI_SetupMenu_Cache( void );
  320. extern void UI_SetupMenu(void);
  321.  
  322. //
  323. // ui_team.c
  324. //
  325. extern void UI_TeamMainMenu( void );
  326. extern void TeamMain_Cache( void );
  327.  
  328. //
  329. // ui_connect.c
  330. //
  331. extern void UI_DrawConnectScreen( qboolean overlay );
  332.  
  333. //
  334. // ui_controls2.c
  335. //
  336. extern void UI_ControlsMenu( void );
  337. extern void Controls_Cache( void );
  338.  
  339. //
  340. // ui_demo2.c
  341. //
  342. extern void UI_DemosMenu( void );
  343. extern void Demos_Cache( void );
  344.  
  345. //
  346. // ui_cinematics.c
  347. //
  348. extern void UI_CinematicsMenu( void );
  349. extern void UI_CinematicsMenu_f( void );
  350. extern void UI_CinematicsMenu_Cache( void );
  351.  
  352. //
  353. // ui_cdkey.c
  354. //
  355. extern void UI_CDKeyMenu( void );
  356. extern void UI_CDKeyMenu_Cache( void );
  357. extern void UI_CDKeyMenu_f( void );
  358.  
  359. //
  360. // ui_playermodel.c
  361. //
  362. extern void UI_PlayerModelMenu( void );
  363. extern void PlayerModel_Cache( void );
  364.  
  365. //
  366. // ui_playersettings.c
  367. //
  368. extern void UI_PlayerSettingsMenu( void );
  369. extern void PlayerSettings_Cache( void );
  370.  
  371. //
  372. // ui_preferences.c
  373. //
  374. extern void UI_PreferencesMenu( void );
  375. extern void Preferences_Cache( void );
  376.  
  377. //
  378. // ui_specifyserver.c
  379. //
  380. extern void UI_SpecifyServerMenu( void );
  381. extern void SpecifyServer_Cache( void );
  382.  
  383. //
  384. // ui_servers2.c
  385. //
  386. #define MAX_FAVORITESERVERS 16
  387.  
  388. extern void UI_ArenaServersMenu( void );
  389. extern void ArenaServers_Cache( void );
  390.  
  391. //
  392. // ui_startserver.c
  393. //
  394. extern void UI_StartServerMenu( qboolean multiplayer );
  395. extern void StartServer_Cache( void );
  396. extern void ServerOptions_Cache( void );
  397. extern void UI_BotSelectMenu( char *bot );
  398. extern void UI_BotSelectMenu_Cache( void );
  399.  
  400. //
  401. // ui_serverinfo.c
  402. //
  403. extern void UI_ServerInfoMenu( void );
  404. extern void ServerInfo_Cache( void );
  405.  
  406. //
  407. // ui_video.c
  408. //
  409. extern void UI_GraphicsOptionsMenu( void );
  410. extern void GraphicsOptions_Cache( void );
  411. extern void DriverInfo_Cache( void );
  412.  
  413. //
  414. // ui_players.c
  415. //
  416.  
  417. //FIXME ripped from cg_local.h
  418. typedef struct {
  419.     int            oldFrame;
  420.     int            oldFrameTime;        // time when ->oldFrame was exactly on
  421.  
  422.     int            frame;
  423.     int            frameTime;            // time when ->frame will be exactly on
  424.  
  425.     float        backlerp;
  426.  
  427.     float        yawAngle;
  428.     qboolean    yawing;
  429.     float        pitchAngle;
  430.     qboolean    pitching;
  431.  
  432.     int            animationNumber;    // may include ANIM_TOGGLEBIT
  433.     animation_t    *animation;
  434.     int            animationTime;        // time when the first frame of the animation will be exact
  435. } lerpFrame_t;
  436.  
  437. typedef struct {
  438.     // model info
  439.     qhandle_t        legsModel;
  440.     qhandle_t        legsSkin;
  441.     lerpFrame_t        legs;
  442.  
  443.     qhandle_t        torsoModel;
  444.     qhandle_t        torsoSkin;
  445.     lerpFrame_t        torso;
  446.  
  447.     qhandle_t        headModel;
  448.     qhandle_t        headSkin;
  449.  
  450.     animation_t        animations[MAX_ANIMATIONS];
  451.  
  452.     qhandle_t        weaponModel;
  453.     qhandle_t        barrelModel;
  454.     qhandle_t        flashModel;
  455.     vec3_t            flashDlightColor;
  456.     int                muzzleFlashTime;
  457.  
  458.     // currently in use drawing parms
  459.     vec3_t            viewAngles;
  460.     vec3_t            moveAngles;
  461.     weapon_t        currentWeapon;
  462.     int                legsAnim;
  463.     int                torsoAnim;
  464.  
  465.     // animation vars
  466.     weapon_t        weapon;
  467.     weapon_t        lastWeapon;
  468.     weapon_t        pendingWeapon;
  469.     int                weaponTimer;
  470.     int                pendingLegsAnim;
  471.     int                torsoAnimationTimer;
  472.  
  473.     int                pendingTorsoAnim;
  474.     int                legsAnimationTimer;
  475.  
  476.     qboolean        chat;
  477.     qboolean        newModel;
  478.  
  479.     qboolean        barrelSpinning;
  480.     float            barrelAngle;
  481.     int                barrelTime;
  482.  
  483.     int                realWeapon;
  484. } playerInfo_t;
  485.  
  486. void UI_DrawPlayer( float x, float y, float w, float h, playerInfo_t *pi, int time );
  487. void UI_PlayerInfo_SetModel( playerInfo_t *pi, const char *model );
  488. void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int legsAnim, int torsoAnim, vec3_t viewAngles, vec3_t moveAngles, weapon_t weaponNum, qboolean chat );
  489. qboolean UI_RegisterClientModelname( playerInfo_t *pi, const char *modelSkinName );
  490.  
  491. //
  492. // ui_atoms.c
  493. //
  494. typedef struct {
  495.     int                    frametime;
  496.     int                    realtime;
  497.     int                    cursorx;
  498.     int                    cursory;
  499.     int                    menusp;
  500.     menuframework_s*    activemenu;
  501.     menuframework_s*    stack[MAX_MENUDEPTH];
  502.     glconfig_t            glconfig;
  503.     qboolean            debug;
  504.     qhandle_t            whiteShader;
  505.     qhandle_t            menuBackShader;
  506.     qhandle_t            menuBackNoLogoShader;
  507.     qhandle_t            charset;
  508.     qhandle_t            charsetProp;
  509.     qhandle_t            charsetPropGlow;
  510.     qhandle_t            charsetPropB;
  511.     qhandle_t            cursor;
  512.     qhandle_t            rb_on;
  513.     qhandle_t            rb_off;
  514.     float                scale;
  515.     float                bias;
  516.     qboolean            demoversion;
  517.     qboolean            firstdraw;
  518. } uiStatic_t;
  519.  
  520. extern void            UI_Init( void );
  521. extern void            UI_Shutdown( void );
  522. extern void            UI_KeyEvent( int key );
  523. extern void            UI_MouseEvent( int dx, int dy );
  524. extern void            UI_Refresh( int realtime );
  525. extern qboolean        UI_ConsoleCommand( void );
  526. extern float        UI_ClampCvar( float min, float max, float value );
  527. extern void            UI_DrawNamedPic( float x, float y, float width, float height, const char *picname );
  528. extern void            UI_DrawHandlePic( float x, float y, float w, float h, qhandle_t hShader ); 
  529. extern void            UI_FillRect( float x, float y, float width, float height, const float *color );
  530. extern void            UI_DrawRect( float x, float y, float width, float height, const float *color );
  531. extern void            UI_UpdateScreen( void );
  532. extern void            UI_SetColor( const float *rgba );
  533. extern void            UI_LerpColor(vec4_t a, vec4_t b, vec4_t c, float t);
  534. extern void            UI_DrawBannerString( int x, int y, const char* str, int style, vec4_t color );
  535. extern float        UI_ProportionalSizeScale( int style );
  536. extern void            UI_DrawProportionalString( int x, int y, const char* str, int style, vec4_t color );
  537. extern int            UI_ProportionalStringWidth( const char* str );
  538. extern void            UI_DrawString( int x, int y, const char* str, int style, vec4_t color );
  539. extern void            UI_DrawChar( int x, int y, int ch, int style, vec4_t color );
  540. extern qboolean     UI_CursorInRect (int x, int y, int width, int height);
  541. extern void            UI_AdjustFrom640( float *x, float *y, float *w, float *h );
  542. extern void            UI_DrawTextBox (int x, int y, int width, int lines);
  543. extern qboolean        UI_IsFullscreen( void );
  544. extern void            UI_SetActiveMenu( uiMenuCommand_t menu );
  545. extern void            UI_PushMenu ( menuframework_s *menu );
  546. extern void            UI_PopMenu (void);
  547. extern void            UI_ForceMenuOff (void);
  548. extern char            *UI_Argv( int arg );
  549. extern char            *UI_Cvar_VariableString( const char *var_name );
  550. extern void            UI_Refresh( int time );
  551. extern void            UI_KeyEvent( int key );
  552. extern void            UI_StartDemoLoop( void );
  553. extern qboolean        m_entersound;
  554. extern uiStatic_t    uis;
  555.  
  556. //
  557. // ui_spLevel.c
  558. //
  559. void UI_SPLevelMenu_Cache( void );
  560. void UI_SPLevelMenu( void );
  561. void UI_SPLevelMenu_f( void );
  562. void UI_SPLevelMenu_ReInit( void );
  563.  
  564. //
  565. // ui_spArena.c
  566. //
  567. void UI_SPArena_Start( const char *arenaInfo );
  568.  
  569. //
  570. // ui_spPostgame.c
  571. //
  572. void UI_SPPostgameMenu_Cache( void );
  573. void UI_SPPostgameMenu_f( void );
  574.  
  575. //
  576. // ui_spSkill.c
  577. //
  578. void UI_SPSkillMenu( const char *arenaInfo );
  579. void UI_SPSkillMenu_Cache( void );
  580.  
  581. //
  582. // ui_syscalls.c
  583. //
  584. void            trap_Print( const char *string );
  585. void            trap_Error( const char *string );
  586. int                trap_Milliseconds( void );
  587. void            trap_Cvar_Register( vmCvar_t *vmCvar, const char *varName, const char *defaultValue, int flags );
  588. void            trap_Cvar_Update( vmCvar_t *vmCvar );
  589. void            trap_Cvar_Set( const char *var_name, const char *value );
  590. float            trap_Cvar_VariableValue( const char *var_name );
  591. void            trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int bufsize );
  592. void            trap_Cvar_SetValue( const char *var_name, float value );
  593. void            trap_Cvar_Reset( const char *name );
  594. void            trap_Cvar_Create( const char *var_name, const char *var_value, int flags );
  595. void            trap_Cvar_InfoStringBuffer( int bit, char *buffer, int bufsize );
  596. int                trap_Argc( void );
  597. void            trap_Argv( int n, char *buffer, int bufferLength );
  598. void            trap_Cmd_ExecuteText( int exec_when, const char *text );    // don't use EXEC_NOW!
  599. int                trap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode );
  600. void            trap_FS_Read( void *buffer, int len, fileHandle_t f );
  601. void            trap_FS_Write( const void *buffer, int len, fileHandle_t f );
  602. void            trap_FS_FCloseFile( fileHandle_t f );
  603. int                trap_FS_GetFileList(  const char *path, const char *extension, char *listbuf, int bufsize );
  604. qhandle_t        trap_R_RegisterModel( const char *name );
  605. qhandle_t        trap_R_RegisterSkin( const char *name );
  606. qhandle_t        trap_R_RegisterShaderNoMip( const char *name );
  607. void            trap_R_ClearScene( void );
  608. void            trap_R_AddRefEntityToScene( const refEntity_t *re );
  609. void            trap_R_AddPolyToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts );
  610. void            trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b );
  611. void            trap_R_RenderScene( const refdef_t *fd );
  612. void            trap_R_SetColor( const float *rgba );
  613. void            trap_R_DrawStretchPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t hShader );
  614. void            trap_UpdateScreen( void );
  615. void            trap_CM_LerpTag( orientation_t *tag, clipHandle_t mod, int startFrame, int endFrame, float frac, const char *tagName );
  616. void            trap_S_StartLocalSound( sfxHandle_t sfx, int channelNum );
  617. sfxHandle_t        trap_S_RegisterSound( const char *sample );
  618. void            trap_Key_KeynumToStringBuf( int keynum, char *buf, int buflen );
  619. void            trap_Key_GetBindingBuf( int keynum, char *buf, int buflen );
  620. void            trap_Key_SetBinding( int keynum, const char *binding );
  621. qboolean        trap_Key_IsDown( int keynum );
  622. qboolean        trap_Key_GetOverstrikeMode( void );
  623. void            trap_Key_SetOverstrikeMode( qboolean state );
  624. void            trap_Key_ClearStates( void );
  625. int                trap_Key_GetCatcher( void );
  626. void            trap_Key_SetCatcher( int catcher );
  627. void            trap_GetClipboardData( char *buf, int bufsize );
  628. void            trap_GetClientState( uiClientState_t *state );
  629. void            trap_GetGlconfig( glconfig_t *glconfig );
  630. int                trap_GetConfigString( int index, char* buff, int buffsize );
  631. int                trap_LAN_GetLocalServerCount( void );
  632. void            trap_LAN_GetLocalServerAddressString( int n, char *buf, int buflen );
  633. int                trap_LAN_GetGlobalServerCount( void );
  634. void            trap_LAN_GetGlobalServerAddressString( int n, char *buf, int buflen );
  635. int                trap_LAN_GetPingQueueCount( void );
  636. void            trap_LAN_ClearPing( int n );
  637. void            trap_LAN_GetPing( int n, char *buf, int buflen, int *pingtime );
  638. void            trap_LAN_GetPingInfo( int n, char *buf, int buflen );
  639. int                trap_MemoryRemaining( void );
  640. void            trap_GetCDKey( char *buf, int buflen );
  641. void            trap_SetCDKey( char *buf );
  642.  
  643. //
  644. // ui_addbots.c
  645. //
  646. void UI_AddBots_Cache( void );
  647. void UI_AddBotsMenu( void );
  648.  
  649. //
  650. // ui_removebots.c
  651. //
  652. void UI_RemoveBots_Cache( void );
  653. void UI_RemoveBotsMenu( void );
  654.  
  655. //
  656. // ui_teamorders.c
  657. //
  658. extern void UI_TeamOrdersMenu( void );
  659. extern void UI_TeamOrdersMenu_f( void );
  660. extern void UI_TeamOrdersMenu_Cache( void );
  661.  
  662. //
  663. // ui_loadconfig.c
  664. //
  665. void UI_LoadConfig_Cache( void );
  666. void UI_LoadConfigMenu( void );
  667.  
  668. //
  669. // ui_saveconfig.c
  670. //
  671. void UI_SaveConfigMenu_Cache( void );
  672. void UI_SaveConfigMenu( void );
  673.  
  674. //
  675. // ui_display.c
  676. //
  677. void UI_DisplayOptionsMenu_Cache( void );
  678. void UI_DisplayOptionsMenu( void );
  679.  
  680. //
  681. // ui_sound.c
  682. //
  683. void UI_SoundOptionsMenu_Cache( void );
  684. void UI_SoundOptionsMenu( void );
  685.  
  686. //
  687. // ui_network.c
  688. //
  689. void UI_NetworkOptionsMenu_Cache( void );
  690. void UI_NetworkOptionsMenu( void );
  691.  
  692. //
  693. // ui_gameinfo.c
  694. //
  695. typedef enum {
  696.     AWARD_ACCURACY,
  697.     AWARD_IMPRESSIVE,
  698.     AWARD_EXCELLENT,
  699.     AWARD_GAUNTLET,
  700.     AWARD_FRAGS,
  701.     AWARD_PERFECT
  702. } awardType_t;
  703.  
  704. const char *UI_GetArenaInfoByNumber( int num );
  705. const char *UI_GetArenaInfoByMap( const char *map );
  706. const char *UI_GetSpecialArenaInfo( const char *tag );
  707. int UI_GetNumArenas( void );
  708. int UI_GetNumSPArenas( void );
  709. int UI_GetNumSPTiers( void );
  710.  
  711. char *UI_GetBotInfoByNumber( int num );
  712. char *UI_GetBotInfoByName( const char *name );
  713. int UI_GetNumBots( void );
  714.  
  715. void UI_GetBestScore( int level, int *score, int *skill );
  716. void UI_SetBestScore( int level, int score );
  717. int UI_TierCompleted( int levelWon );
  718. qboolean UI_ShowTierVideo( int tier );
  719. qboolean UI_CanShowTierVideo( int tier );
  720. int  UI_GetCurrentGame( void );
  721. void UI_NewGame( void );
  722. void UI_LogAwardData( int award, int data );
  723. int UI_GetAwardLevel( int award );
  724.  
  725. void UI_SPUnlock_f( void );
  726. void UI_SPUnlockMedals_f( void );
  727.  
  728. void UI_InitGameinfo( void );
  729.  
  730. #endif
  731.